<!-- 主体内容  -->
<template>
	<el-container direction="vertical" class="vs-layout fixed">
		<vs-header></vs-header>
		<el-container class="hidden">
			<vs-sidebar></vs-sidebar>
			<el-main direction="vertical" class="vs-main">
				<router-view></router-view>
				<vs-footer></vs-footer>
			</el-main>
		</el-container>
	</el-container>
</template>
<script>
import _json from '@/assets/json/all.json'
import _tags from '@/assets/json/tags.json'
export default {
	name: 'vs-main',
	components: {
		VsSidebar: () => import('@/components/main/sidebar/'),
		VsHeader: () => import('@/components/main/header/'),
		VsFooter: () => import('@/components/main/footer/'),
	},
	data() {
		return {
			activeName: 'Link',
			links: [],
			searchText: '',

			tags: [],
			searchTag: '',

			count: 0,
			drawer: false,
			direction: 'rtl',
		}
	},
	computed: {
		filterTag: function(value) {
			var key = this.searchTag;
			var tags = this.tags;
			return tags.filter(function(item) {
				return item.toLowerCase().indexOf(key.toLowerCase()) != -1
			});
		},
		filterLinks: function(value) {
			var key = this.searchText;
			var links = this.links;
			return links.filter(function(item) {
				return item.name.toLowerCase().indexOf(key.toLowerCase()) != -1
			});
		}
	},
	created() {
		document.title = '';
	},
	mounted() {
		this.links = _json;
		this.tags = _tags;
		this.$nextTick(function() {});
	},
	methods: {
		handleClose(done) {
			this.$confirm('确认关闭？').then(_ => {
				done();
			}).catch(_ => {});
		},

		load() {
			this.count += 7
		},
	},
}

</script>
<style scoped>
</style>
